﻿using Kingdee.BOS.Core.DynamicForm;
using Kingdee.BOS.Core.DynamicForm.PlugIn;
using Kingdee.BOS.Core.DynamicForm.PlugIn.Args;
using Kingdee.BOS.Orm;
using Kingdee.BOS.ServiceHelper;
using Kingdee.BOS.Util;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RK.SerivesPlugin.CommonTest
{
    [Description("测试操作交互信息及回馈信息"), HotUpdate]
    public class TestOperationInfos : AbstractOperationServicePlugIn
    {
        public override void OnPreparePropertys(PreparePropertysEventArgs e)
        {
            base.OnPreparePropertys(e);
            //e.FieldKeys.Add("F_IsAutoAudit");
        }
        public override void BeforeExecuteOperationTransaction(BeforeExecuteOperationTransaction e)
        {
            base.BeforeExecuteOperationTransaction(e);
        }
        public override void EndOperationTransaction(EndOperationTransactionArgs e)
        {
            base.EndOperationTransaction(e);
            //var ids = (from w in e.DataEntitys
            //           where Convert.ToBoolean(w["F_IsAutoAudit"])
            //           select w into s
            //           select s["id"]).ToArray();
            //if (ids.Count() <= 0) { return; }
            //var serType = this.Context.ServiceType;
            //string dStatus = e.DataEntitys[0]["DocumentStatus"].ToString();
            //string billNo = e.DataEntitys[0]["BillNo"].ToString();
            //IOperationResult operationResult = BusinessDataServiceHelper.Audit(this.Context, this.BusinessInfo, ids, OperateOption.Create());
        }
    }
}
